144 core micro, looks like it runs fourth

您所在的位置:网站首页 two forths 144 core micro, looks like it runs fourth

144 core micro, looks like it runs fourth

2023-03-12 00:26| 来源: 网络整理| 查看: 265

It is the Monday after Chinese New Years and there was a little green card in my mail box saying that the Post Office attempted delivery of my GA144. So now I have to seek out where it is.

The question of how to deploy floating point has been a persistent debate in Forth.

Prof. Braino seems to think that the microprocessor should provide floating point ability in hardware, not the Forth. That seems to be more of a point of view issue as C has long provided a floating point library. Most microcontrollers provide binary add, subtract, multiply, and divide.. so software takes up the slack. Some have math coprocessors, others have added maths ability.

So unlike C that provides a Floating point library, one generally has to install a math coprocessor or create a floating point library specific to the given processors. Yes, it would seem to be Forth is missing something that C has in portable code.

The GA144 does have good examples of 36 bit maths, but in signed and unsigned integer. And it has the carry bit that is required to go even farther.. 72bit or 144 bit maths.

Floating point tends to be a expectation from the evolution of the electric calculator with its display to 12 places... a human interface issue. It is most useful in conversion to units that the user and general public commonly understand. One can always do the conversions of data and units at the tail end of a process with a spreadsheet in a desktop computer or in a user interface in C. After all, that is where the human sees the results.

Here is an excerpt that supports what I am trying to say. A lot of traditionalist do not provide floating point for specialized Forths for specific microcontrollers.... too slow.

"12. Floating point arithmetic Although Forth at one time eschewed floating point arithmetic (because in the era before math co-processors integer arithmetic was 3x faster), in recent years a standard set of word names has been agreed upon. This permits the exchange of programs that will operate correctly on any computer, as well as the development of a Scientific Subroutine Library in Forth (FSL). Although the ANS Standard does not require a separate stack for floating point numbers, most programmers who use Forth for numer- ical analysis employ a separate floating point stack; and most of the routines in the FSL assume such. We shall do so here as well.

The floating point operators have the following names and perform the actions indicated in the accompanying stack comments:F@ ( adr --) ( f: -- x) F! ( adr --) ( f: x --) F+ ( f: x y -- x+y)F- ( f: x y -- x-y) F* ( f: x y -- x*y) F/ ( f: x y -- x/y) FEXP ( f: x -- e^x) FLN ( f: x -- ln[x]) FSQRT ( f: x -- x^0.5) Additional operators, functions, trigonometric functions, etc. can be found in the FLOATING and FLOATING EXT wordsets. (See dpANS6— available in HTML, PostScript and MS Word formats. The HTML version can be accessed from this homepage.) "... A Beginner's Guide to Forth by J.V. Noble.



【本文地址】


今日新闻


推荐新闻


CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3